<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        Mindmap
    </ui:define>

    <ui:define name="description">
        Mindmap is an interactive mindmapping tool featuring lazy loading, callbacks, animations and more.
    </ui:define>

    <ui:param name="documentationLink" value="/components/mindmap" />

    <ui:define name="implementation">

        <h:form>
            <p:mindmap value="#{mindmapView.root}" style="width: 100%;height: 600px;border: 1px solid black;">
                <p:ajax event="select" listener="#{mindmapView.onNodeSelect}" />
                <p:ajax event="dblselect" listener="#{mindmapView.onNodeDblselect}" update="output" oncomplete="PF('details').show();" />
            </p:mindmap>
            
            <p:dialog widgetVar="details" header="Node Details" resizable="false" modal="true" showEffect="fade" hideEffect="fade">
                <h:outputText id="output" value="#{minmapView.selectedNode.data}" />
            </p:dialog> 
        </h:form>
        
    </ui:define>

</ui:composition>
